package site.zhouinfo.designpattern.guanchazhemoshi.jdk;

/**
 * @author zhou
 * @create 2017-04-06 17:47
 * @email zhouinfo@qq.com
 */
public class JdkMain {

    public static void main(String[] args) {
        JdkNewsPaper 今日头条 = new JdkNewsPaper();

        JdkReader jdkReader1 = new JdkReader("小明");
        JdkReader jdkReader2 = new JdkReader("小红");
        JdkReader jdkReader3 = new JdkReader("小白");

        今日头条.addObserver(jdkReader1);
        今日头条.addObserver(jdkReader2);
        今日头条.addObserver(jdkReader3);

        今日头条.setContent("今天大新闻:发现外星人了!!!");
    }
}
